package ace.module.oauth2.server.sdk.core.feign.impl;

import org.springframework.cloud.openfeign.FeignClient;
import ace.cmp.openfeign.security.oauth2.core.config.FeignInternalServerOauth2SecurityConfig;
import ace.cmp.core.model.R;
import ace.module.common.api.annotation.ApiRemoteProxyPriority;
import ace.module.oauth2.server.sdk.core.feign.Oauth2RegisteredClientAuthConfigFeignApi;
import ace.module.oauth2.server.sdk.core.constant.SdkConstant;

/**
* oauth2客户端支持的认证与授权协议配置,支持本地bean与rest方式 rpc feign.
*
* @author Caspar
*/
@FeignClient(
    name = "${spring.cloud.openfeign.client.config.oauth2RegisteredClientAuthConfigFeign.name:" + SdkConstant.FEIGN_SERVICE_NAME + "}",
    contextId = "oauth2RegisteredClientAuthConfigFeign",
    path = Oauth2RegisteredClientAuthConfigFeign.PATH,
    configuration = FeignInternalServerOauth2SecurityConfig.class,
    primary = false
)
@ApiRemoteProxyPriority
public interface Oauth2RegisteredClientAuthConfigFeign extends Oauth2RegisteredClientAuthConfigFeignApi {
    String PATH = "${spring.cloud.openfeign.client.config.oauth2RegisteredClientAuthConfigFeign.path:/oauth2-server/oauth2-registered-client-auth-config/rpc}";
}